package com.yss.adapter;

import com.yss.pojo.BondDTO;

public class OtherAdapter extends IAdapter {
    @Override
    public Object handle(AdapterExtraInfo adapterExtraInfo) {
        return runtimeHandle(adapterExtraInfo);
    }

    @Override
    public Object runtimeHandle(AdapterExtraInfo adapterExtraInfo) {
        BondDTO bond = (BondDTO) adapterExtraInfo.getParams();
        bond.setAmount(
                bond.getPrice().multiply(bond.getQuantity())
        );
        return bond;
    }
}
